<?php

namespace App\Http\Requests;

use App\Http\Requests\Request;

class zntestArticleRequest extends Request
{
    protected $messages = [
        'title.required' => '用户名ssssssss必须',
        'username.exists' => '用户名错误或不存在',
        'content.required' => '密码必须',
        'password.exists' => '密码错误'
    ];

    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'title' => 'required',
            'content' => 'required'
        ];
    }

    public function messages()
    {
        return $this->messages;
    }
}
